
/** Tank object class that has
 * fields for all of the attributes
 * that the tank will need.
 * Also has a reverse field
 * for reversing the sprite.
 * 
 * 
 * NOTE FOR USE:
 * If changing an attribute
 * that is used in draw()
 * please note that draw()
 * is a function in object
 * and not TankObject. This
 * means you have to change
 * the attribute in the super
 * class object before it has
 * an effect in draw().
 * 
 * @author Andrew
 * LAST UPDATED - Andrew 5/02/12
 */


public class TankObject extends Object {
    // Tanks health in %
    public int Health = 100;
    
    // Sprite Reference for object
    public String sprite = "cata.png";
    
    /** Space for attributes like armour
     * or inventory
     */
    
    // Is object reversed?
    private boolean reversed = false;
    
    // create a new Object with a sprite
  public TankObject(double x, double y,String sprite) {
      super((new Sprite(sprite)),x,y);
  }
  
  // reverses object by loading new sprite
  public void reverse() {
      reversed = true;
      super.sprite = new Sprite("catar.png");
  }
  
}